﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ocmf.Types;

namespace Ocmf.Forms
{
    public partial class EditHouseLightActionForm : Form
    {
        public HouseLight HouseLight { get; set; }

        public EditHouseLightActionForm(HouseLight houseLight)
        {
            InitializeComponent();

            HouseLight = houseLight;

            radioButtonOn.Checked = HouseLight.LightState;
            radioButtonOff.Checked = !radioButtonOn.Checked;
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            HouseLight.LightState = radioButtonOn.Checked;
            DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
